package com.websocket_client;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.net.URI;
import java.net.URISyntaxException;

/**
 * @ClassName: WebSocketTest
 * @Author: ZhangYue26
 * @Description:
 * @Date: 2021-05-06
 */
@Component
public class WebSocketTest {

    @Scheduled(fixedDelay = Integer.MAX_VALUE,initialDelay = 100)
    public void test() throws Exception {
//        SSLWebSocketClient client = (SSLWebSocketClient)WebsocketUtils.getClient("ws://10.32.1.27:17258/citymirror-web/action/getPerson.do/2");
//        client.connect();
        MyWebSocketClient client = new MyWebSocketClient(new URI("ws://10.32.1.27:17258/citymirror-web/action/getPerson.do/2"));
        client.connect();

    }
}
